package com.ruoyi.project.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.DanMapper;
import com.ruoyi.project.system.domain.Dan;
import com.ruoyi.project.system.service.IDanService;

/**
 * 运输单Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-04-26
 */
@Service
public class DanServiceImpl implements IDanService 
{
    @Autowired
    private DanMapper danMapper;

    /**
     * 查询运输单
     * 
     * @param publishId 运输单ID
     * @return 运输单
     */
    @Override
    public Dan selectDanById(String publishId)
    {
        return danMapper.selectDanById(publishId);
    }

    /**
     * 查询运输单列表
     * 
     * @param dan 运输单
     * @return 运输单
     */
    @Override
    public List<Dan> selectDanList(Dan dan)
    {
        return danMapper.selectDanList(dan);
    }

    /**
     * 新增运输单
     * 
     * @param dan 运输单
     * @return 结果
     */
    @Override
    public int insertDan(Dan dan)
    {
        return danMapper.insertDan(dan);
    }

    /**
     * 修改运输单
     * 
     * @param dan 运输单
     * @return 结果
     */
    @Override
    public int updateDan(Dan dan)
    {
        return danMapper.updateDan(dan);
    }

    /**
     * 批量删除运输单
     * 
     * @param publishIds 需要删除的运输单ID
     * @return 结果
     */
    @Override
    public int deleteDanByIds(String[] publishIds)
    {
        return danMapper.deleteDanByIds(publishIds);
    }

    /**
     * 删除运输单信息
     * 
     * @param publishId 运输单ID
     * @return 结果
     */
    @Override
    public int deleteDanById(String publishId)
    {
        return danMapper.deleteDanById(publishId);
    }
}
